package com.dl698.axdr;

/**
 * GetRequestChoice枚举
 * 定义获取请求选择的枚举值
 */
public enum GetRequestChoice {
    _ERR_NONE_SELECTED(-1),
    GET_REQUEST_NORMAL(0),
    GET_REQUEST_NORMAL_LIST(1),
    GET_REQUEST_RECORD(2),
    GET_REQUEST_RECORD_LIST(3),
    GET_REQUEST_NEXT(4);

    private final int value;

    GetRequestChoice(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static GetRequestChoice fromValue(int value) {
        for (GetRequestChoice choice : GetRequestChoice.values()) {
            if (choice.value == value) {
                return choice;
            }
        }
        return _ERR_NONE_SELECTED;
    }
}